class ParamNormsController < ApplicationController
  # GET /param_norms
  # GET /param_norms.xml
  def index
    @param_norms = ParamNorm.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @param_norms }
    end
  end

  # GET /param_norms/1
  # GET /param_norms/1.xml
  def show
    @param_norm = ParamNorm.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @param_norm }
    end
  end

  # GET /param_norms/new
  # GET /param_norms/new.xml
  def new
    @param_norm = ParamNorm.new

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @param_norm }
    end
  end

  # GET /param_norms/1/edit
  def edit
    @param_norm = ParamNorm.find(params[:id])
  end

  # POST /param_norms
  # POST /param_norms.xml
  def create
    @param_norm = ParamNorm.new(params[:param_norm])

    respond_to do |format|
      if @param_norm.save
        flash[:notice] = 'ParamNorm was successfully created.'
        format.html { redirect_to(@param_norm) }
        format.xml  { render :xml => @param_norm, :status => :created, :location => @param_norm }
      else
        format.html { render :action => "new" }
        format.xml  { render :xml => @param_norm.errors, :status => :unprocessable_entity }
      end
    end
  end

  # PUT /param_norms/1
  # PUT /param_norms/1.xml
  def update
    @param_norm = ParamNorm.find(params[:id])

    respond_to do |format|
      if @param_norm.update_attributes(params[:param_norm])
        flash[:notice] = 'ParamNorm was successfully updated.'
        format.html { redirect_to(@param_norm) }
        format.xml  { head :ok }
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @param_norm.errors, :status => :unprocessable_entity }
      end
    end
  end

  # DELETE /param_norms/1
  # DELETE /param_norms/1.xml
  def destroy
    @param_norm = ParamNorm.find(params[:id])
    @param_norm.destroy

    respond_to do |format|
      format.html { redirect_to(param_norms_url) }
      format.xml  { head :ok }
    end
  end
end
